package com.knowledge.plus.设计模式.单例模式.懒汉式;

/**
 * 懒汉式：基础版（非线程安全）
 *
 * @author TPF
 * @since 2025/6/10
 */
public class UnsafeLazySingleton {

    private static UnsafeLazySingleton instance;

    private UnsafeLazySingleton() {}

    public static UnsafeLazySingleton getInstance() {
        if (instance == null) { // 线程不安全点
            instance = new UnsafeLazySingleton();
        }
        return instance;
    }

}
